Data compression or source coding is the process of encoding information using fewer bits than an unencoded representation would use through use of specific encoding schemes. As with any communication, compressed data communication only works when both the sender and receiver of the information understand the encoding scheme.
Dictionary-based encoding systems typically involve an encoding algorithm for encoding an input stream that avoids duplication by producing an encoded stream that assigns codes to input strings that are repeated in the input stream. The decoding system typically applies the same algorithm in the reverse order to decode the encoded stream to provide a decoded output stream. Conventional dictionary-based systems typically output codes that are generally all of one or two fixed lengths, or a length that depends on the size of the input processed so far.